<template>
  <PageWrapper>
    <BasicTable @register="register" />
  </PageWrapper>
</template>
<script setup lang="ts">
  import { PageWrapper } from '@/components/Page';
  import { BasicTable, useTable } from '@/components/Table';
  import { ref } from 'vue';

  const columns = [
    {
      title: '用户名',
      dataIndex: 'userName',
    },
    {
      title: '姓名',
      dataIndex: 'realName',
    },
    {
      title: '手机号',
      dataIndex: 'mobilePhone',
    },
  ];
  const dataSource = ref([
    {
      id: '1',
      userName: 'superAdmin',
      realName: '张三',
      mobilePhone: '18234098989',
    },
    {
      id: '2',
      userName: 'admin',
      realName: '李四',
      mobilePhone: '18234098982',
    },
  ]);
  const [register] = useTable({
    columns,
    dataSource,
  });
</script>
<style lang="less" scoped></style>
